A substance produced by the mucosa of the stomach and intestines that is essential for the absorption of vitamin B12